﻿	#pragma strict

function Update () {
 
    if (Input.GetKeyDown(KeyCode.A)) {
        MyRotate();
    }
     if (Input.GetKeyDown(KeyCode.S)) {
        MyRotato();
    }
}
 
function MyRotate() {
    for(var i = 0; i<180; i+=2) {
         //print ("Entered for. Value is " + transform.eulerAngles.z);
         yield;
         transform.Rotate(0,2,0);
    }
}
 
function MyRotato() {
    for(var i = 0; i>-180; i-=2) {
         //print ("Entered for. Value is " + transform.eulerAngles.z);
         yield;
         transform.Rotate(0, -2, 0);
    }
}